<div id="content">
	<div class="row s_page_title" *ngIf="pageType ==='new'">
		<sa-big-breadcrumbs [items]="['实施管理','实施人员管理','添加实施人员']" icon="fa fa-wrench" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<div class="row s_page_title" *ngIf="pageType ==='updata'">
		<sa-big-breadcrumbs [items]="['实施管理','实施人员管理','编辑实施人员']" icon="fa fa-wrench" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<div class="s_page_wrap">
		<div class="page-header">
			<h1 class="page_detail_title">{{page_title}}实施人员</h1>
		</div>
		<div class="row" style="margin-top:5px;">
			<div class="col-xs-12">
				<form id="userForm" name="userForm" class="form-horizontal" role="form" novalidate="novalidate" [saBootstrapValidator]="validatorOptions">
					<div class="form-group">
						<div class="col-sm-6">
							<h2 class="page_detail_title">基本信息</h2>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right">账户名<sup>*</sup></label>
						<div class="col-sm-10">
							<div class="clearfix">
								<input class="form-control" name="userName" [disabled]='page_title === "编辑"?true:false'  [(ngModel)]='page.userName' type="text"  placeholder="将做为用户登录系统的账户(英文)..." />
							</div>
						</div>
					</div>
					<div class="form-group" *ngIf='page_title === "新增"'>
						<label class="control-label col-sm-1 no-padding-right">密码<sup>*</sup></label>
						<div class="col-sm-10">
							<div class="clearfix">
								<input class="form-control" name="password" [(ngModel)]='page.password' type="password" placeholder="密码..." autocomplete="new-password"/>
							</div>
						</div>
					</div>
					<div class="form-group" *ngIf='page_title === "新增"'>
						<label class="control-label col-sm-1 no-padding-right" >确认密码<sup>*</sup></label>
						<div class="col-sm-10">
							<div class="clearfix">
								<input class="form-control" name="repassword" [(ngModel)]='page.repassword' type="password" placeholder="确认密码..." autocomplete="new-password"/>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right">实施团队<sup>*</sup></label>
						<div class="col-sm-10 s_hover_box">
							<input type="hidden" class="form-control" id="outsourcingTeamName" name="outsourcingTeamName" [(ngModel)]="page.outsourcingTeamName"/>
							<div class="clearfix s_fix_select2">
								<select class="form-control select2" id="teamSelect2" style="width: 100%">
									<option value=''></option>
								</select>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right">员工类型<sup>*</sup></label>
						<div class="col-sm-10">
							<div class="clearfix">
								<select class="form-control" name="workerType" [(ngModel)]="page.workerType" style="width: 100%">
									<option value="" selected>请选择</option>
									<option *ngFor="let item of workerTypeList" [value]="item.value">{{item.label}}</option>
								</select>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right">真实姓名<sup>*</sup></label>
						<div class="col-sm-10">
							<div class="clearfix">
								<input class="form-control" name="name" type="text" [(ngModel)]='page.name' placeholder="真实姓名..." autocomplete='name'/>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right">电话号码<sup>*</sup></label>
						<div class="col-sm-10">
							<div class="clearfix">
								<input class="form-control" name="phone" type="text" [(ngModel)]='page.phone' placeholder="电话号码..." autocomplete='tel-national'/>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right" for="role.id">在职状态<sup>*</sup></label>
						<div class="col-sm-10">
							<div class="clearfix">
								<select class="form-control" name="workerState" style="width: 100%" [(ngModel)]='page.workerState'>
									<option value="" selected>请选择</option>
									<option value='1'>在职</option>
									<option value='0'>离职</option>
								</select>
							</div>
						</div>
					</div>
					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right">邮箱</label>
						<div class="col-sm-10">
							<div class="clearfix">
								<input class="form-control" name="email" type="text" [(ngModel)]='page.email' placeholder="邮箱..." autocomplete="email"/>
							</div>
						</div>
					</div>

					<div class="form-group">
						<label class="control-label col-sm-1 no-padding-right">用户描述</label>
						<div class="col-sm-10">
							<div class="clearfix">
								<input class="form-control" [(ngModel)]='page.description' name="description" id="description" type="text" placeholder="用户描述..." />
							</div>
						</div>
					</div>
					<!-- <div class="form-group">
						<div class="col-sm-6" style="position: relative;">
							<h2 class="page_detail_title" style="height: 40px;line-height: 40px;">
								薪酬配置
								<button class="btn btn-primary" style="position: absolute;right: 0px;left: auto;" (click)='addSalaryTemplate(salaryTemplateModal)'>添加薪酬与模板</button>
							</h2>
							<div class="form-group">
								<label class="control-label col-sm-4 no-padding-right">基本薪资[元/月]</label>
								<div class="col-sm-8">
									<div class="clearfix">
										<input class="form-control" [(ngModel)]='page.baseWages' name="baseWages" id="baseWages" type="text" placeholder="请输入..." />
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="control-label col-sm-4 no-padding-right">高精度17-4补贴[[元/通道]</label>
								<div class="col-sm-8">
									<div class="clearfix">
										<input class="form-control" [(ngModel)]='page.tallSubsidy' name="tallSubsidy" id="tallSubsidy" type="text" placeholder="请输入..." />
									</div>
								</div>
							</div>
							<div class="form-group">
								<label class="control-label col-sm-4 no-padding-right">17-4(V1)补贴[元/通道]</label>
								<div class="col-sm-8">
									<div class="clearfix">
										<input class="form-control" [(ngModel)]='page.subsidy' name="subsidy" id="subsidy" type="text" placeholder="请输入..." />
									</div>
								</div>
							</div>
							<div *ngIf="page.workerType == 2" class="form-group">
								<label class="control-label col-sm-4 no-padding-right">安装提成[元/台]</label>
								<div class="col-sm-8">
									<div class="clearfix">
										<input class="form-control" [(ngModel)]='page.royalty' name="royalty" id="royalty" type="text" placeholder="请输入..." />
									</div>
								</div>
							</div>
						</div>
						<div class="col-sm-6">
							<div class="form-group pay-main">
								<div *ngFor="let item of salaryTemplateList;let i = index" class="pay-list">
									<span (click)="submitPay(i)">{{item.templateName}}</span>
									<i class="fa fa-trash-o el-icon" (click)="deletePay(i)"></i>
								</div>
							</div>
						</div>
					</div> -->
					<div class="center">
						<button class="btn btn-primary" *ngIf='page_title === "新增"' (click)='onSubmit()'>添加</button>
						<button class="btn btn-primary" *ngIf='page_title === "编辑"' (click)='onSubmit()'>保存</button>
						<button type="button" (click)='goBack()' class="btn default">返回</button>
					</div>
				</form>
				<div class="hr hr-dotted"></div>
			</div>
		</div>
	</div>

	<!--    弹窗 新增薪酬模板 新增-->
  <section
    bsModal
    #salaryTemplateModal="bs-modal"
    class="modal fade"
    tabindex="-1"
    role="dialog"
    aria-labelledby="myLargeModalLabel"
    aria-hidden="true"
  >
    <div class="modal-dialog modal-lg" style="width: 800px">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" (click)="salaryTemplateClose(salaryTemplateModal)" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
          <h4 class="modal-title">添加薪酬模板</h4>
        </div>
        <div class="modal-body" style="min-height: 240px; max-height: 560px">
          <div class="row form-horizontal">
						<form id="salaryTemplate" name="salaryTemplate" class="form-horizontal" role="form" novalidate="novalidate" [saBootstrapValidator]="salaryTemplateValidatorOptions">
							<div class="form-group col-sm-12">
								<label class="control-label col-xs-3 no-padding-right" style="padding: 7px 0 0">
									模板名称：
									<sup>*</sup>
								</label>
								<div class="col-xs-9">
									<input
										class="form-control"
										type="text"
										[(ngModel)]="salaryTemplateFrom.templateName"
										name="templateName"
										id="templateName"
										autocomplete="off"
										placeholder="请输入"
										maxlength="10"
									/>
								</div>
							</div>
							<div class="form-group col-sm-12">
								<label class="control-label col-xs-3 no-padding-right" style="padding: 7px 0 0">基本薪资[元/月]：</label>
								<div class="col-xs-9">
									<input
										class="form-control"
										type="text"
										[(ngModel)]="salaryTemplateFrom.baseWages"
										name="baseWages"
										placeholder="请输入"
									/>
								</div>
							</div>
							<div class="form-group col-sm-12">
								<label class="control-label col-xs-3 no-padding-right" style="padding: 7px 0 0">高精度17-4补贴[[元/通道]：</label>
								<div class="col-xs-9">
									<input
										class="form-control"
										type="text"
										[(ngModel)]="salaryTemplateFrom.tallSubsidy"
										name="tallSubsidy"
										placeholder="请输入"
									/>
								</div>
							</div>
							<div class="form-group col-sm-12">
								<label class="control-label col-xs-3 no-padding-right" style="padding: 7px 0 0">17-4-（V1）补贴[元/通道]：</label>
								<div class="col-xs-9">
									<input
										class="form-control"
										type="text"
										[(ngModel)]="salaryTemplateFrom.subsidy"
										name="subsidy"
										placeholder="请输入"
									/>
								</div>
							</div>
							<div class="form-group col-sm-12">
								<label class="control-label col-xs-3 no-padding-right" style="padding: 7px 0 0">安装提成[元/台]：</label>
								<div class="col-xs-9">
									<input
										class="form-control"
										type="text"
										[(ngModel)]="salaryTemplateFrom.royalty"
										name="royalty"
										placeholder="请输入"
									/>
								</div>
							</div>
						</form>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" (click)="salaryTemplateClose(salaryTemplateModal)">取消</button>
          <button type="button" class="btn btn-primary" (click)="salaryTemplateSubmit(salaryTemplateModal)">提交</button>
        </div>
      </div>
    </div>
  </section>
  <!--  弹窗end-->
</div>